<?php

namespace Addons\HelloWorld\Model;

use Home\Model\WeixinModel;
use Org\Util\Snoopy;

/**
 * HelloWorld的微信模型
 */
class WeixinAddonModel extends WeixinModel {
	function reply($dataArr, $keywordArr = array()) {
//		$url=OAuthWeixin(addons_url("HelloWorld:HelloWorld/index"));
//		$info = get_token_appinfo (get_token());
//		$param ['appid'] = $info ['appid'];
//		$param ['redirect_uri'] = urldecode(addons_url("HelloWorld:HelloWorld/index"));
//		$param ['response_type'] = 'code';
//		$param ['scope'] = 'snsapi_userinfo';
//		$param ['state'] = 456;
//
//		$url = 'https://open.weixin.qq.com/connect/oauth2/authorize?' . http_build_query ( $param ) . '#wechat_redirect';
//		$url=addons_url('HelloWorld://HelloWorld/index',$p);
//		$url2=OAuthWeixin();

		$u=urldecode(addons_url("HelloWorld:HelloWorld/in"));


		$this->replyText ("$u");

	}
	
	// 关注公众号事件
	public function subscribe() {
		return true;
	}
	
	// 取消关注公众号事件
	public function unsubscribe() {
		return true;
	}
	
	// 扫描带参数二维码事件
	public function scan() {
		return true;
	}
	
	// 上报地理位置事件
	public function location() {
		return true;
	}
	
	// 自定义菜单事件
	public function click() {
		return true;
	}
}
        	